package com.edu.d5_innerclass_anomous_style;

/**
 * 掌握匿名内部类可以作为参数传输
 */
public class Test {
    public static void main(String[] args) {
        swimming swimming = new swimming() {
            @Override
            public void Swim() {
                System.out.println("学生游得贼快");
            }
        };
        Stu(swimming);
    }
    public static void Stu(swimming s){
        System.out.println("开始");
        s.Swim();
        System.out.println("结束");
    }
}

interface swimming{
    void Swim();
}
